package com.ssm.util.security;


import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

import org.springframework.stereotype.Component;

@Component
@Aspect
public class SSMAop {
	
	@Pointcut("execution(* com.ssm.controller.*.*(..))")  
	private void addAllMethod(){}
	
	@Before("addAllMethod()")  
	public void checkIsOk(){
		//SecurityUtils.getSubject().login(new UsernamePasswordToken(SsmUsers.getUsername(), SsmUsers.getPassword()));  
		System.out.println("验证用户合法性···");
	}
	
	@Before(value="addAllMethod()")
	public void addLog(){
		System.out.println("添加日志····");
	}
	
}
